<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>组织迁移</title>

    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <script src="/js/jquery.min.js"></script>
    <script src="/js/assets/amazeui.widgets.helper.min.js"></script>
    <script src="/js/assets/amazeui.widgets.helper.js"></script>
    <script src="/js/assets/amazeui.ie8polyfill.min.js"></script>
    <script src="/js/assets/amazeui.ie8polyfill.js"></script>
    <script src="/js/assets/amazeui.min.js"></script>
    <script src="/js/assets/amazeui.js"></script>
    <script src="/js/mui.min.js"></script>

    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap-treeview.js"></script>

    <link rel="stylesheet" type="text/css" href="/css/assets/amazeui.min.css">
    <link rel="stylesheet" type="text/css" href="/css/assets/amazeui.css">
    <link rel="stylesheet" type="text/css" href="/css/mui.min.css">

    <style>
        #submit{
            margin-top: 20px;
        }
        textarea{
            background: gainsboro;
            margin: 24px 0;
            padding: 8px;
        }
        form{
            padding: 10px;
            position: relative;
            left: 10%;
            width: 85%;
            top: -99px;
            background: white;
        }
        #submit{
            width: 100%;
        }
        #middlePopover1{
            height: 200px;
        }
        .detail{
            background: darkcyan;
        }
        body{
            font-size: 12px;
        }
        .am-u-sm-10{
            width: 57%;
        }
        .am-u-sm-2{
            width: auto;
        }
        .am-form-group{
            height: 30px;
            margin: 0;
        }
        img.am-thumbnail, .am-thumbnail > img, .am-thumbnail a > img{
            margin-top: 115px;
        }
        form{
            height: 100%;
        }
        .am-btn am-btn-danger{
            height: 20px;
            font-size: 5px;
            padding: 0 23px;
        }
        button, input:not([type="radio"]):not([type="checkbox"]), select{
            height: 20px;
        }
        .am-g{
            background: darkcyan;
        }
    </style>
</head>
<body>
    <div class="detail">
        <div class="am-g">

            <div class="am-u-sm-8">

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">姓名</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_UserName()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">生日</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_Gender()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">个人学历</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_Educational()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">民族</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_Nation()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">出生地</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_NativePlace()}"></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">申请入党日期</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_JoinPartyDate()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">正式入党日期</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_BeRegularDate()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">联系地址</label>
                    <div class="am-u-sm-10">
                        <span th:text="${member.getFd_Address()}" ></span>
                    </div>
                </div>

                <div class="am-form-group">
                    <label class="am-u-sm-2 am-form-label">通讯手机</label>
                    <div class="am-u-sm-10">
                        <span th:text="${detail.getFd_MobileNo()}"></span>
                    </div>
                </div>

            </div>
            <div class="am-u-sm-4">
                <img class="am-thumbnail" th:src="${member.getFd_ImageUrl()}" alt=""/>
            </div>
        </div>


    </div>
    <form action="savePartyrelationship" class="am-form" method="post">
        <p>原组织</p>
        <p th:text="${member.getFd_branchName()}"></p>

        <input name="fd_LoginID" id="fd_LoginID" th:value="${member.getFd_loginId()}" hidden="hidden">
        <input name="fd_MemberName" id="fd_MemberName" th:value="${member.getFd_UserName()}" hidden="hidden">
        <input type="hidden" name="fd_TageBranchID" th:value="${member.getFd_branchId()}" hidden="hidden">
        <input type="hidden" id="fd_TageBranchID" name="fd_FormerBranchID" hidden="hidden">
        <input type="hidden" id="fd_ApplicationId" value="0" name="fd_ApplicationId" hidden="hidden">
        <input type="hidden" id="fd_Status" name="fd_Status" vale="0" hidden="hidden">
        <p>新组织</p>
        <input type="text" id="TageBranchID" class="am-form-field">
        <a href="#middlePopover1" class="am-btn am-btn-danger">请选择</a>
        <input type="submit" class="am-btn am-btn-danger" id="submit" disabled="none">
    </form>
</body>
<div id="middlePopover1" class="mui-popover" >
    <div class="mui-popover-arrow"></div>
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll" id="treeview-searchable1">
        </div>
    </div>
</div>
<script>
    mui('.mui-scroll-wrapper').scroll();
    loadPart2();
    function loadPart2(){
        //$("#middlePopover .mui-table-view").;
        var li="";
        $.ajax({
            url:'getTblPartyOrgBranchAll',
            dataType:'text',//服务器返回json格式数据
            type:'post',//HTTP请求类型
            timeout:10000,//超时时间设置为10秒；
            success:function(data){
                var jsondata=JSON.parse(data);
                console.log(data);
                var $searchableTree = $('#treeview-searchable1').treeview({
                    data: jsondata,
                    onNodeSelected: function(event, node) {
                        console.log(node.text);
                        $("#TageBranchID").val(node.text);
                        $("#fd_TageBranchID").val(node.fd_BranchID);
                        $("#middlePopover1").hide();
                        $("#bg").hide();
                        $(".mui-backdrop").remove();
                    },

                });

            },
            error:function(xhr,type,errorThrown){
                //异常处理；
                console.log(type);
            }
        });
    }
</script>
</html>